#ifndef DEACTIVATEWIDGET_H
#define DEACTIVATEWIDGET_H

#include <QWidget>
#include <QTcpSocket>
#include <QHostAddress>
#include "receive_dbus.h"
#include "interface.h"
#include "socketmanager.h"

namespace Ui {
class DeactivateWidget;
}

class DeactivateWidget : public QWidget
{
    Q_OBJECT

public:
    explicit DeactivateWidget(QWidget *parent = nullptr);
    ~DeactivateWidget();
    void getServerInfo(int type,QHostAddress serverip);
    void disconnect_any_signal();
    void deactivate_init();

    QString server_dns;

private:
    Ui::DeactivateWidget *ui;
    QTcpSocket *tcpSocket=nullptr;
    QHostAddress serverip;
    QString errorText;

signals:
    void returnSignal();
private slots:
    void on_returnbtn_clicked();
    void on_activebtn_clicked();

protected:
    void paintEvent(QPaintEvent *event);
};

#endif // DEACTIVATEWIDGET_H
